/*
 * AbstractEdge.java
 *
 * Created on 2007年10月12日, 下午9:26
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package com.exclamation.util.graph;

/**
 *
 * @author littlerock
 */
public abstract class AbstractEdge implements Edge {

    protected int id;
    protected Object value;

    /** Creates a new instance of AbstractEdge */
    protected AbstractEdge(int id) {
        this(id, null);
    }

    protected AbstractEdge(int id, Object value) {
        this.id = id;
        this.value = value;
    }

    public boolean isDirected() {
        return this.getGraph().isDirected();
    }

    public Object getValue() {
        return this.value;
    }

    public int getId() {
        return this.id;
    }

    public void setValue(Object value) {
        this.value = value;
    }
}
